var express = require('express');
var router = express.Router();

const {
    login,UserList,zhuce,Grabble,deleteUser,ModifyUser,ListOne,
    addUser,FinanceList,EquipmentsList,AdminsList,ReceptionsList,
    addFinance,deleteFinance,GrabbleFinance,ListOneFinance,
    ModifyFinance,addEquipments,GrabbleEquipments,deleteEquipments,
    ListOneEquipments,ModifyEquipments,GrabbleReceptions,
    deleteReceptions,addReceptions,ListOneReceptions,ModifyReceptions,
    GrabbleAdmins,deleteAdmins,ListOneAdmins,ModifyAdmins,
    } = require('./controllers');

/* GET users listing. */
//用户列表router
router.get('/UserList',UserList)
router.get('/FinanceList',FinanceList)
router.get('/EquipmentsList',EquipmentsList)
router.get('/AdminsList',AdminsList)
router.get('/ReceptionsList',ReceptionsList)


//登录router
router.post('/login',login);

//添加用户
router.post('/zhuce',zhuce);
router.post('/addUser',addUser);
router.post('/addFinance',addFinance);
router.post('/addEquipments',addEquipments);
router.post('/addReceptions',addReceptions);

//ID查找单个用户
router.put('/ListOne',ListOne);
router.put('/ListOneFinance',ListOneFinance);
router.put('/ListOneEquipments',ListOneEquipments);
router.put('/ListOneReceptions',ListOneReceptions);
router.put('/ListOneAdmins',ListOneAdmins);

//修改用户
router.post('/ModifyUser',ModifyUser);
router.post('/ModifyFinance',ModifyFinance);
router.post('/ModifyEquipments',ModifyEquipments);
router.post('/ModifyReceptions',ModifyReceptions);
router.post('/ModifyAdmins',ModifyAdmins);

// 查询使用用户名用户
router.post('/Grabble',Grabble);
router.post('/GrabbleFinance',GrabbleFinance);
router.post('/GrabbleEquipments',GrabbleEquipments);
router.post('/GrabbleReceptions',GrabbleReceptions);
router.post('/GrabbleAdmins',GrabbleAdmins);

//删除用户
router.delete('/deleteUser',deleteUser)
router.delete('/deleteFinance',deleteFinance)
router.delete('/deleteEquipments',deleteEquipments)
router.delete('/deleteReceptions',deleteReceptions)
router.delete('/deleteAdmins',deleteAdmins)




module.exports = router;